<%@page contentType="text/html; charset=utf-8"%>
<%@ include file="../inc/TagLibs.jsp"%>
<c:set var="pageTitle" value="产量登记" />
<%@ include file="../inc/Title.jsp"%>
<head>
<link rel="stylesheet" type="text/css" href="/css/base.css" />
<link href="/calendar/dhtmlgoodies_calendar/dhtmlgoodies_calendar.css" rel="stylesheet" type="text/css">
<script src="/js/popup_ext.js"></script>
<script src="/calendar/dhtmlgoodies_calendar/dhtmlgoodies_calendar.js"></script>
<script language="javascript">
	function doCancel(){
		parent.ClosePop();
	}
	function doSave(flag){
		if(flag=='3'){//并工序完工
			document.getElementById("comp").value="PY";
			document.getElementById("continue_flag").value="0";
		}else{
			document.getElementById("comp").value="N";
			document.getElementById("continue_flag").value=flag;
		}
		frm.submit();
	}
	function selectStaffer(){
		var url="/base/StafferMainForSelect.ihtm";
		ShowIframe("选择员工",url,800,500,"selectStafferCallBack()",400,300);
	}
	function selectStafferCallBack(){
		if(popRetVal!=null){
			var arr=popRetVal.split(";");
			document.getElementById("maker_id").value=arr[0];
			document.getElementById("maker_name").value=arr[1];
		}
	}
	function doInit(){
		showFormErrorMsg();
	}
</script>
</head>
<c:set var="dateEdit" value="Y" />
<c:if test="${currentUser.user.userType!=1 && fn:indexOf(currentUser.privs,';NO_BILL_DATE;')!=-1}">
	<c:set var="dateEdit" value="N" />
</c:if>
<body oncontextmenu="return false" onload="doInit();" class="sheet modal-dialog" style=" padding-top:10px;">
<div class="sheet-main" id="bodyDiv" style="width:360px;">
  <div class="sheet-list" style="width:100%">
    <div class="modal-main search-business">
		<div style="width:100%;">
 			<c:set var="pageTopTitle" value="产量登记" />
			<%@ include file="../inc/PageTop.jsp"%>
			
			<form name="frm" method="post" action="OutputNew.ihtm">
			<table border="0" cellspacing="1" cellpadding="1" align="center" class="table-a">
				<tr>    
			      	<th>制作人：</th>
			      	<td>
			      		<input type="text" class="TextBox readonly" readonly="true" id="maker_name" name="maker_name" value="${makerName}">
			      		<img class="make-a" src="/images/make-a.gif" onClick="selectStaffer();" style="cursor:pointer;" />
			      		<input type="hidden" id="maker_id" name="maker_id" value="${makerId}">
			      	</td>
			    </tr>
			    <tr>
			    	<th>工序：</th>
			      	<td>
			      		<select name="pro_id" id="pro_id">
			      			<c:forEach var="item" items="${proList}">
			      			<option value="${item.id}" <c:if test="${item.id==proId}">selected</c:if>>${item.processName}</option>
			      			</c:forEach>
			      		</select>
			      	</td>
			    </tr>
			    <tr>
			    	<th>完成比例：</th>
			      	<td>
			      		<input type="text" class="TextBox" id="percent" name="percent" value="${percent}">
			      		<span class="give">1表示全部由本人完成，0.5表示本人完成一半，以此类推</span>
			      	</td>
			    </tr>
			    <tr>
			    	<th>制作日期：</th>
			      	<td >
			      		<input type="text" maxlength="15" id="make_date" name="make_date" value="${makeDate}" <c:if test="${dateEdit=='Y'}">class="TextBox Datetime"</c:if><c:if test="${dateEdit=='N'}">class="TextBox Datetime readonly" readonly="true"</c:if>>
			      		<c:if test="${dateEdit=='Y'}"><img src="/images/calendar.gif" style="cursor:pointer" onClick="displayCalendar(document.getElementById('make_date'),'yyyy-mm-dd',document.getElementById('make_date'));"></c:if>
			      	</td>
			    </tr>
			    <tr>
			    	<th>备注：</th>
			      	<td>
			      		<input type="text" maxlength="50" class="TextBox" id="mark" name="mark" value="${mark}">
			      	</td>
			    </tr>
			</table>		

			<input type="hidden" id="item_id_str" name="item_id_str" value="${itemIdStr}">
			<input type="hidden" id="wc_id" name="wc_id" value="${wcId}">
			<input type="hidden" id="continue_flag" name="continue_flag" value="">
			<input type="hidden" id="comp" name="comp" value="">
			</form>
		</div>
  	</div>
  </div>
	<div class="modal-buttom">
		<input type="button" class="buttom-a" value=" 保 存 " onClick="doSave('');">
		<input type="button" class="buttom-a" value="保存并完工" onClick="doSave('3');">
		<input type="button" class="buttom-a" value="保存并新增" onClick="doSave('1');">
		<input type="button" class="buttom-a" value=" 取 消 " onClick="doCancel();">
	</div>  
</div>

</body>
</html>